// Author: wsfuyibing <682805@qq.com>
// Date: 2025-05-14

package kind

// BasanState
// 钓点状态.
type BasanState int

const (
	BasanStateUnknown BasanState = iota
	BasanStateEnabled
	BasanStateDisabled
)

var (
	basanStateTexts = map[BasanState]string{
		BasanStateUnknown:  "未知",
		BasanStateEnabled:  "启用",
		BasanStateDisabled: "禁用",
	}
	basanStateUnknownText = "未知"
	basanStateFlags       = map[BasanState]string{
		BasanStateEnabled:  "enabled",
		BasanStateDisabled: "disabled",
	}
	basanStateUnknownFlag = "unknown"
)

func (o BasanState) Flag() string {
	if str, ok := basanStateFlags[o]; ok {
		return str
	}
	return basanStateUnknownFlag
}

func (o BasanState) IsDisabled() bool { return o == BasanStateDisabled }
func (o BasanState) IsEnabled() bool  { return o == BasanStateEnabled }

func (o BasanState) Text() string {
	if str, ok := basanStateTexts[o]; ok {
		return str
	}
	return basanStateUnknownText
}
